

        <!-- help-data -->


    
    <div class="detailHandle"><div class="detailCollapsed"></div><a name='aggregate'><code class="symbol">aggregate</code></a>: <span class="type">Array | Object</span><span class="defaultValue">(default: undefined)</span></div><div class="detailBody"><div class="desc"> Sets fields on which initial aggregates should be calculated</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>// calculates total sum of unitPrice field's values.
[{ field: "unitPrice", aggregate: "sum" }]</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='data'><code class="symbol">data</code></a>: <span class="type">Array</span></div><div class="detailBody"><div class="desc">Specifies the local JavaScript object to use for the data source.</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>// bind the datasource to a local JavaScript array
var orders = [ { orderId: 10248, customerName: "Paul Smith" }, { orderId: 10249, customerName: "Jane Jones" }];
var dataSource = new kendo.data.DataSource({
     data: orders
});</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='filter'><code class="symbol">filter</code></a>: <span class="type">Array | Object</span><span class="defaultValue">(default: undefined)</span></div><div class="detailBody"><div class="desc"> Sets initial filter</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>// returns only data where orderId is equal to 10248
filter: { field: "orderId", operator: "eq", value: 10248 }

// returns only data where orderId is equal to 10248 and customerName starts with Paul
filter: [ { field: "orderId", operator: "eq", value: 10248 },
          { field: "customerName", operator: "startswith", value: "Paul" } ]</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='group'><code class="symbol">group</code></a>: <span class="type">Array | Object</span><span class="defaultValue">(default: undefined)</span></div><div class="detailBody"><div class="desc"> Sets initial grouping</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>// groups data by orderId field
group: { field: "orderId" }

// groups data by orderId and customerName fields
group: [ { field: "orderId", dir: "desc" }, { field: "customerName", dir: "asc" } ]</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='page'><code class="symbol">page</code></a>: <span class="type">Number</span><span class="defaultValue">(default: undefined)</span></div><div class="detailBody"><div class="desc"> Sets the index of the displayed page of data.</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
    page: 2 // displays the second page of data in the bound widget
});</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='pageSize'><code class="symbol">pageSize</code></a>: <span class="type">Number</span><span class="defaultValue">(default: undefined)</span></div><div class="detailBody"><div class="desc"> Sets the number of records which contains a given page of data.</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
    pageSize: 5 // 5 records per page of data
});</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='schema'><code class="symbol">schema</code></a>: <span class="type">Object</span></div><div class="detailBody"><div class="desc">Set the object responsible for describing the raw data format</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
     transport: {
       read: "Catalog/Titles",
     },
     schema: {
         aggregates: function(data) {
              // returns aggregates
         },
         data: function(data) {
             return data.result;
         },
         total: function(data) {
             return data.totalCount;
         },
         parse: function(data) {
             return data;
         },
         type: "jsonp"
     }
 });</code></pre></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='aggregates'><code class="symbol">aggregates</code></a>: <span class="type">Function</span></div><div class="detailBody"><div class="desc">Returns the calculated aggregates as object.
Result should have the following format:</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>{
  FIEL1DNAME: {
      FUNCTON1NAME: FUNCTION1VALUE,
      FUNCTON2NAME: FUNCTION2VALUE
  },
  FIELD2NAME: {
      FUNCTON1NAME: FUNCTION1VALUE
  }
}</code></pre></div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>{
  unitPrice: {
      max: 100,
      min: 1
  },
  productName: {
      count: 42
  }
}</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='data'><code class="symbol">data</code></a>: <span class="type">Function</span></div><div class="detailBody"><div class="desc">Returns the deserialized data as array.</div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='groups'><code class="symbol">groups</code></a>: <span class="type">Function</span></div><div class="detailBody"><div class="desc">Used instead of data function if remote grouping operation is executed.
 Returns the deserialized data as array.
Result should have the following format:</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>[{
  aggregates: {
      FIEL1DNAME: {
          FUNCTON1NAME: FUNCTION1VALUE,
          FUNCTON2NAME: FUNCTION2VALUE
      },
      FIELD2NAME: {
          FUNCTON1NAME: FUNCTION1VALUE
      }
  },
  fieldName: FIELDNAME, // the field name on which is grouped
  hasSubgroups: true, // false if there are not sub group items and this is the top most group
  items: [
  // either the inner group items (if hasSubgroups is true) or the data records
     {
         aggregates: {
             //nested group aggregates
         },
         fieldName: NESTEDGROUPFIELDNAME,
         hasSubgroups: false,
         items: [
         // data records
         ],
         value: NESTEDGROUPVALUE
     },
     //nestedgroup2, nestedgroup3, etc.
  ],
  value: VALUE // value of the field on which is grouped
}
// group2, group3, etc.
]</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='model'><code class="symbol">model</code></a>: <span class="type">Object</span></div><div class="detailBody"><div class="desc">Describes the Model</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
       //..
        schema: {
            model: {
                id: "ProductID",
                fields: {
                     ProductID: {
                        //this field will not be editable (default value is true)
                        editable: false,
                        // a defaultValue will not be assigned (default value is false)
                        nullable: true
                     },
                     ProductName: {
                         validation: { //set validation rules
                             required: true
                         }
                     },
                     UnitPrice: {
                       //data type of the field {Number|String|Boolean|Date} default is String
                       type: "number",
                       // used when new model is created
                       defaultValue: 42,
                       validation: {
                           required: true,
                           min: 1
                       }
                   }
               }
           }
       }
   })</code></pre></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='fields'><code class="symbol">fields</code></a>: <span class="type">Object</span></div><div class="detailBody"><div class="desc">Describes the model fields and their properties
<p>Available field attrbiutes:</p>
<div class="details-list">
    <dl>
        <dt><b>editable</b></dt>
        <dd>Determines if this field will be editable (default value is true)</dd>
        <dt><b>defaultValue</b></dt>
        <dd>The value which will be used to populate the field when new non-existing model is created.
            Default value is type attrbiute specific i.e. string fields will have empty string as defaultValue</dd>
        <dt><b>nullable</b></dt>
        <dd>Determines if the value set through defaultValue will be used (default value is false) </dd>
        <dt><b>type</b></dt>
        <dd>The type of the field {Number|String|Boolean|Date}. Default type is string.</dd>
        <dt><b>validation</b></dt>
        <dd>A set of validation rules. The built-in KendoUI Validator rules are available as well as custom rules.</dd>
    </dl>
</div></div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
       //..
        schema: {
            model: {
                fields: {
                     UnitPrice: {
                       validation: {
                           required: true,
                           min: 1,
                           date: { message: "My custom message" }, // custom message
                           aCustomRule: function(input) { // custom validation rule
                              return input.val() === "foo"
                           }
                       }
                   }
               }
           }
       }
   })</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='id'><code class="symbol">id</code></a>: <span class="type">Number | String</span></div><div class="detailBody"><div class="desc">The field use to identify an unique Model instance</div></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='parse'><code class="symbol">parse</code></a>: <span class="type">Function</span></div><div class="detailBody"><div class="desc">Executed before deserialized data is read.
 Appropriate for preprocessing of the raw data.</div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='total'><code class="symbol">total</code></a>: <span class="type">Function</span></div><div class="detailBody"><div class="desc">Returns the total number of records.</div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='type'><code class="symbol">type</code></a>: <span class="type">String</span></div><div class="detailBody"><div class="desc">Specify the type of schema { xml | json }</div></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='serverAggregates'><code class="symbol">serverAggregates</code></a>: <span class="type">Boolean</span><span class="defaultValue">(default: false)</span></div><div class="detailBody"><div class="desc"> Determines if aggregates should be calculated on the server.</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
    transport: {
        read: "orders.json"
    },
    serverAggregates: true,
    aggregate: { field: "orderId", operator: "eq", value: 10248 } // return only data where orderId equals 10248
});</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='serverFiltering'><code class="symbol">serverFiltering</code></a>: <span class="type">Boolean</span><span class="defaultValue">(default: false)</span></div><div class="detailBody"><div class="desc"> Determines if filtering of the data should be handled on the server.
<p>The <b>serverFiltering</b> must be used in conjunction with the <b>filter</b> configuration.  By default, a filter object is sent to the server with the query string in the following form:</p>
<ul>
<li>filter[logic]: and</li>
<li>filter[filters][0][field]: orderId</li>
<li>filter[filters][0][operator]: desc</li>
<li>filter[filters][0][value]: 10248</li>
</ul>
<p>Possible values for <b>operator</b> include:</p>
<div class="details-list">
    <dl>
        <dt><b>Equal To</b></dt>
        <dd>"eq", "==", "isequalto", "equals", "equalto", "equal"</dd>
        <dt><b>Not Equal To</b></dt>
        <dd>"neq", "!=", "isnotequalto", "notequals", "notequalto", "notequal", "ne"</dd>
        <dt><b>Less Then</b></dt>
        <dd>"lt", "<", "islessthan", "lessthan", "less"</dd>
        <dt><b>Less Then or Equal To</b></dt>
        <dd> "lte", "<=", "islessthanorequalto", "lessthanequal", "le"</dd>
        <dt><b>Greater Then</b></dt>
        <dd> "gt", ">", "isgreaterthan", "greaterthan", "greater"</dd>
        <dt><b>Greater Then or Equal To</b></dt>
        <dd>"gte", ">=", "isgreaterthanorequalto", "greaterthanequal", "ge"</dd>
        <dt><b>Starts With</b></dt>
        <dd>"startswith"</dd>
        <dt><b>Ends With</b></dt>
        <dd>"endswith"</dd>
        <dt><b>Contains</b></dt>
        <dd>"contains", "substringof"</dd>
    </dl>
</div>
<p>It is possible to modify these parameters by using the <b>parameterMap</b> function found on the <b>transport</b> object (see <b>transport</b> in Configuration).</p></div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
    transport: {
        read: "orders.json"
    },
    serverFiltering: true,
    filter: { field: "orderId", operator: "eq", value: 10248 } // return only data where orderId equals 10248
});</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='serverGrouping'><code class="symbol">serverGrouping</code></a>: <span class="type">Boolean</span><span class="defaultValue">(default: false)</span></div><div class="detailBody"><div class="desc"> Determines if grouping of the data should be handled on the server.
<p>The <b>serverGrouping</b> must be used in conjunction with the <b>group</b> configuration.  By default, a group object is sent to the server with the query string in the following form:</p>
<ul>
<li>group[0][field]: orderId</li>
<li>group[0][dir]: desc</li>
</ul>
<p>It is possible to modify these parameters by using the <b>parameterMap</b> function found on the <b>transport</b> object (see <b>transport</b> in Configuration).</p></div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
    transport: {
        read: "orders.json"
    },
    serverGrouping: true,
    sort: { field: "orderId", dir: "asc" } // group by orderId descending
});</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='serverPaging'><code class="symbol">serverPaging</code></a>: <span class="type">Boolean</span><span class="defaultValue">(default: false)</span></div><div class="detailBody"><div class="desc"> Determines if paging of the data should be handled on the server.
<p><b>serverPaging</b> must be used in conjunction with the <b>pageSize</b> configuration setting. The following options to the server as part of the query string by default:
<div class="details-list">
    <dl>
        <dt><b>take</b></dt>
        <dd>contains the number of records to retreive</dd>
        <dt><b>skip</b></dt>
        <dd>how many records from the front of the dataset to begin reading</dd>
        <dt><b>page</b></dt>
        <dd>the index of the current page of data</dd>
        <dt><b>pageSize</b></dt>
        <dd>the number of records per page</dd>
   </dl>
</div>
<p>It is possible to modify these parameters by using the <b>parameterMap</b> function found on the <b>transport</b> object (see <b>transport</b> in Configuration).</p></div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
    transport: {
        read: "orders.json"
    },
    serverPaging: true,
    pageSize: 5 // 5 records per page
});</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='serverSorting'><code class="symbol">serverSorting</code></a>: <span class="type">Boolean</span><span class="defaultValue">(default: false)</span></div><div class="detailBody"><div class="desc"> Determines if sorting of the data should be handled on the server.
<p>The <b>serverSorting</b> must be used in conjunction with the <b>sort</b> configuration.  By default, a sort object is sent to the server with the query string in the following form:</p>
<ul>
<li>sort[0][field]: orderId</li>
<li>sort[0][dir]: asc</li>
</ul>
<p>It is possible to modify these parameters by using the <b>parameterMap</b> function found on the <b>transport</b> object (see <b>transport</b> in Configuration).</p></div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
    transport: {
        read: "orders.json"
    },
    serverSorting: true,
    sort: { field: "orderId", dir: "asc" }
});</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='sort'><code class="symbol">sort</code></a>: <span class="type">Array | Object</span><span class="defaultValue">(default: undefined)</span></div><div class="detailBody"><div class="desc"> Sets initial sort order</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>// sorts data ascending by orderId field
sort: { field: "orderId", dir: "asc" }

// sorts data ascending by orderId field and then descending by shipmentDate
sort: [ { field: "orderId", dir: "asc" }, { field: "shipmentDate", dir: "desc" } ]</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='transport'><code class="symbol">transport</code></a>: <span class="type">Object</span></div><div class="detailBody"><div class="desc">Sets the object responsible for loading and saving of data.
 This can be a remote or local/in-memory data.</div><div class="detailHandle"><div class="detailCollapsed"></div><a name='create'><code class="symbol">create</code></a>: <span class="type">Object | String</span></div><div class="detailBody"><div class="desc">Options for remote create data operation, or the URL of the remote service</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
    transport: {
        read: "orders.json",
        create: {
            url: "orders/create.json",
            data: {
                orderId: $("#input").val() // sends the value of the input as the orderId
            }
        }
    }
});</code></pre></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='dataType'><code class="symbol">dataType</code></a>: <span class="type">String</span></div><div class="detailBody"><div class="desc">The type of data that you're expecting back from the server</div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='url'><code class="symbol">url</code></a>: <span class="type">Object | String</span></div><div class="detailBody"><div class="desc">The remote url to call when creating a new record</div></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='destroy'><code class="symbol">destroy</code></a>: <span class="type">Object | String</span></div><div class="detailBody"><div class="desc">Options for the remote delete data operation, or the URL of the remote service</div><div class="detailHandle"><div class="detailCollapsed"></div><a name='dataType'><code class="symbol">dataType</code></a>: <span class="type">String</span></div><div class="detailBody"><div class="desc">The type of data that you're expecting back from the server</div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='url'><code class="symbol">url</code></a>: <span class="type">Object | String</span></div><div class="detailBody"><div class="desc">The remote url to call when creating a new record</div></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='parameterMap'><code class="symbol">parameterMap</code></a>: <span class="type">Function</span></div><div class="detailBody"><div class="desc">Convert the request parameters from dataSource format to remote service specific format.</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
     transport: {
       read: "Catalog/Titles",
       parameterMap: function(options) {
          return {
             pageIndex: options.page,
             size: options.pageSize,
             orderBy: convertSort(options.sort)
          }
       }
     }
 });</code></pre></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='read'><code class="symbol">read</code></a>: <span class="type">Object | String</span></div><div class="detailBody"><div class="desc">Options for remote read data operation, or the URL of the remote service</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>// settings various options for remote data transport
var dataSource = new kendo.data.DataSource({
    transport: {
        read: {
            // the remote service URL
            url: "http://search.twitter.com/search.json",

            // JSONP is required for cross-domain AJAX
            dataType: "jsonp",

            // additional parameters sent to the remote service
            data: {
                q: function() {
                    return $("#searchFor").val();
                }
            }
        }
    }
});

 // consuming odata feed without setting additional options
 var dataSource = new kendo.data.DataSource({
     type: "odata",
     transport: {
         read: "http://odata.netflix.com/Catalog/Titles"
     }
 });</code></pre></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='data'><code class="symbol">data</code></a>: <span class="type">Object | Function</span></div><div class="detailBody"><div class="desc">Additional data to be sent to the server</div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='dataType'><code class="symbol">dataType</code></a>: <span class="type">String</span></div><div class="detailBody"><div class="desc">The type of data that you're expecting back from the server</div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='url'><code class="symbol">url</code></a>: <span class="type">String</span></div><div class="detailBody"><div class="desc">The remote service URL</div></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='update'><code class="symbol">update</code></a>: <span class="type">Object | String</span></div><div class="detailBody"><div class="desc">Options for remote update operation, or the URL of the remote service</div><div class="code-sample"><h4 class="code-title">Example</h4><pre class="code prettyprint"><code>var dataSource = new kendo.data.DataSource({
    transport: {
        read: "orders.json",
        update: {
            url: "orders/update.json",
        }
    }
});</code></pre></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='dataType'><code class="symbol">dataType</code></a>: <span class="type">String</span></div><div class="detailBody"><div class="desc">The type of data that you're expecting back from the server</div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='url'><code class="symbol">url</code></a>: <span class="type">Object | String</span></div><div class="detailBody"><div class="desc">The remote url to call when updating a record</div></div></div></div><div class="detailHandle"><div class="detailCollapsed"></div><a name='type'><code class="symbol">type</code></a>: <span class="type">String</span></div><div class="detailBody"><div class="desc">Loads transport with preconfigured settings. Currently supports only "odata" (Requires kendo.data.odata.js to be included).</div></div>

